 #ifndef __THREAD_POOL__
#define __THREAD_POOL__
#include <23c.h>
#include "taskQueue.h"
#include <shadow.h>
#include <openssl/md5.h>
typedef struct threadPool_s{
    pthread_t *tidArr; // 所有子线程的tid构成的数组
    int threadNum; // 子线程的数量
    taskQueue_t taskQueue; // 任务队列
    int isexit;
    char buf[4096];
    int netfd;
} threadPool_t;
int threadPoolInit(threadPool_t *pthreadPool, int workerNum);
int makeWorker(threadPool_t * pthreadPool);
void *threadFunc(void *pargs);
int tcpInit(const char *ip,const char *port, int *psockfd);
int epollCtor();
int epollAdd(int epfd, int fd);
int epollDel(int epfd, int fd);
typedef struct train_s{
    int length;
    char data[1000]; 
} train_t;
int recvn(int netfd, void *buf, int length);
int sendn(int fd_send, char* send_buf, int len);
int transFile(int netfd,char *str);
int recvFile(int netfd);
typedef struct 
{
    int dataLen;
    char usrAddr[20];
    char pwd[100];
    int flag;
}usraddr;
void get_salt(char *salt, char *passwd);
int md5(char *str,unsigned char *md5);
#define BUF_SIZE 4096
#endif